<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<base href="<%=basePath %>" />
	<link type="text/css" rel="stylesheet" href="skin/default/base.css" media="all"/>
	<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
	<style type="text/css">
		.real-content form .formItem{padding-top: 10px;}
		.formItem label{width: 50px;display: block;font-size: 14px;}
		.formItem input{width: 400px;}
	</style>
</head>
<body>

	<%@include file="header.jsp" %>
	
	<div id="title-heading" class="pagetitle">
		<a href="javascript:void"><img class="logo space custom" src="skin/default/images/banner.jpg" height="50" alt=""></a>
		<span id="title-text"><a href="index.jsp">帮助中心</a></span>
    </div>
	<div id="content" class="page view">

		<div class="clearfix">
			<div class="sidebar">
					<div class="tabletitle">
						<span id="tree-title">帮助手册导航</span>
					</div>
					<div class="spacetree">
						<div id="pagetreesearch">
							<form action="article/search.do" name="pagetreesearchform">
								<input type="text" size="20" name="queryString">
								<input type="submit" value="Search">
							</form>
						</div> 
						<div>
							<tag:nvgTree nvgList="${nvgList }"></tag:nvgTree>
						</div>
					</div>
				</div>
			</div>
			<div class="real-content">
				<div class="wiki-content">
					<c:set var="editPsath">${art.id}/edit</c:set>
					<form action="${art.id !=null ? editPsath :'add'}.do" method="post" style="width: 800px">
						<div class="formItem">
							<label>标题:</label>
							<input type="text" name="title" value="${art.title }"/>
						</div>
						<div class="formItem">
							<label>父节点:</label>
							<tag:titleSelectTree name="parent" nvgList="${nvgList}" value="${art.parent }" id="form_parent"></tag:titleSelectTree>
						</div>
						<div class="formItem">
							<label>内容:</label>
							<textarea id="form_content" name="content">${art.content }</textarea>
						</div>
						<div>
							<button>提交</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		window.UEDITOR_HOME_URL = "<%=path %>/ueditor/";
	</script>
	<script type="text/javascript" src="ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="ueditor/ueditor.all.js"></script>
	<script type="text/JavaScript" defer="defer">
		$(document).ready(function(){
			UE.getEditor('form_content')
		})
	</script>
</body>